package org.example.hzit.controller;



import org.example.hzit.client.UserClient;
import org.example.hzit.entity.User;
import org.example.hzit.service.ITbBrandService;
import org.example.hzit.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gww
 * @since 2025-01-13
 */
@RestController
@RequestMapping("/tbBrand")
public class TbBrandController {

    @Autowired
    private ITbBrandService brandService;

    @Autowired
    private UserClient client;



    @GetMapping("/list")
    public R list() {
        return R.ok(brandService.list());
    }

    @GetMapping("/user/list")
    public R<List<User>> userList(){
        return client.list();
    }


}
